home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 3 / CD ACTUAL 3.iso / linux / system / bsvc-1.000 / bsvc-1 / bsvc-1.0.4 / src / Framework / BasicDeviceRegistry.cxx < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-26  |  1.3 KB  |  42 lines

  1. /////////////////////////////////////////////////////////////////////////////// //
  2. // $Id: BasicDeviceRegistry.cxx,v 1.1 1994/02/18 19:48:47 bmott Exp $
  3. /////////////////////////////////////////////////////////////////////////////// //
  4. // BasicDeviceRegistry.cxx
  5. //
  6. //   This abstract base class is used to derive a class that maintains a list
  7. // of al the device in the simulator and allows them to be created.
  8. //
  9. //
  10. // BSVC "A Microprocessor Simulation Framework"
  11. // Copyright (c) 1993
  12. // By: Bradford W. Mott
  13. // October 30,1993
  14. //
  15. ///////////////////////////////////////////////////////////////////////////////
  16. // $Log: BasicDeviceRegistry.cxx,v $
  17. // Revision 1.1  1994/02/18  19:48:47  bmott
  18. // Initial revision
  19. //
  20. ///////////////////////////////////////////////////////////////////////////////
  21.  
  22. #include "BasicCPU.hxx"
  23. #include "BasicDevice.hxx"
  24. #include "BasicDeviceRegistry.hxx"
  25.  
  26. ///////////////////////////////////////////////////////////////////////////////
  27. // Get the device information with the given index (return 1=OK,0=ERROR)
  28. ///////////////////////////////////////////////////////////////////////////////
  29. int BasicDeviceRegistry::Information(int i, DeviceInformation &info)
  30. {
  31.   if (i<number_of_devices)
  32.   {
  33.     info=devices[i];
  34.     return(1);
  35.   }
  36.   else
  37.   {
  38.     return(0);
  39.   } 
  40. }
  41.  
  42.